package com.yp.infrastructure.mdb.properties;


import javax.sql.DataSource;

/**
 * 数据库连接设置
 */

public class DatabaseProperties {

    /**
     * 用户名
     */
    private String user;
    /**
     * 密码
     */
    private String password;
    /**
     * 连接字串
     */
    private String url;

    /**
     * jdbc
     */
    private String driver;


    /**
     * 连接池管理
     */
    private Class<? extends DataSource> type;

    /**
     * 最大连接数
     */
    private int max = 10;

    /**
     * 空闲阶段最小连接数
     */
    private int idle = 3;

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public Class<? extends DataSource> getType() {
        return type;
    }

    public void setType(Class<? extends DataSource> type) {
        this.type = type;
    }

    public int getMax() {
        return max;
    }

    public void setMax(int max) {
        this.max = max;
    }

    public int getIdle() {
        return idle;
    }

    public void setIdle(int idle) {
        this.idle = idle;
    }
}
